/*
SteelNzb
Copyright (C) 2008  Wessel v. Staal

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/

#ifndef NZBQUEUE_INCLUDED
#define NZBQUEUE_INCLUDED

#include "nzb.h"

void* nzbqueue_createNzbQueueState(void* nzbState);
void* nzbqueue_getQueueItem(void* state);

nzbFile* nzbqueue_getQueueItemFile(void* state, void* item);
nzbFilePart* nzbqueue_getQueueItemFilePart(void* state, void* item);
int nzbqueue_getQueueItemType(void* state, void* item);
int nzbqueue_getQueueItemStatus(void* state, void* item);

void nzbqueue_setQueueItemStatus(void* state, void* item, int status);
int nzbqueue_getQueueItemPartNumber(void* state, void* item);

void nzbqueue_freeQueue(void* nzbQueue);
void nzbqueue_setUserData(void* state, void* userdata);

#define QUEUE_ITEM_STATE_OPEN 0
#define QUEUE_ITEM_STATE_PROCESSING 1
#define QUEUE_ITEM_STATE_FAILED 2
#define QUEUE_ITEM_STATE_SUCCESS 3

#define QUEUE_ITEM_TYPE_PART 0
#define QUEUE_ITEM_TYPE_EOF 1

#endif


